Storage area network system

ABSTRACT

In remote copy systems connected with a dedicated interface, reliability is reduced for the time until the disk system that caused an error will be recovered. 
     Therefore, when an error occurs in a primary disk system, it is replaced with a standby disk system connected to a storage area network. 
     As a result, a remote copy system with high reliability is obtained.

FIELD OF THE INVENTION

The present invention relates to a storage area network that performsremote copying in the condition that a disk system, which is a storagesystem, is connected to the storage area network.

BACKGROUND OF THE INVENTION

A magnetic disk unit that has high cost performance is generally used asa device for storing data from a computer. A magnetic disk has amechanism for reading and writing data by means of magnetic heads thatare positioned on both surfaces of each magnetic disk of a plurality ofmagnetic disks of about 2.5 inch or 3.5 inch size.

The processing time of the magnetic disk, because it operates bymechanical action, is about 10 millisecond, which is slow compared tothe processing speed of the processor. There are many cases in which theperformance of a system overall does not improve because the processoris made faster but the disk is not made faster. There is the disk arrayas a means for solving this problem. As described on pages 271-291 ofUnderstanding I/O Subsystems, First Edition, by W. David Schwaderer andAndrew W. Wilson, Jr., the disk array is a method that improvesperformance and reliability by allocating to distribute data to aplurality of drives and also storing redundant data too on the drives.In large-scale systems, a required total capacity of all drives is alsolarge and disk arrays are used because both performance and reliabilityare required.

The method of achieving high reliability using a plurality of diskarrays over a wide area is described in U.S. Pat. No. 5,870,537 whilethe disk array increase reliability of the system itself In U.S. Pat.No. 5,870,537, two disk controllers are connected with amainframe-dedicated optical interface (ESCON), one is defined as aprimary disk system and the other as a secondary disk system. There aretwo host computers, one is connected to the primary disk system andsecondary disk system, and the other is connected to only the secondarydisk system. In remote copy, when a write request is issued from thehost computer which is connected to the primary disk system, to theprimary disk system, the primary disk system transfers the write requestto the secondary disk system via the aforementioned ESCON and the samedata is stored in the secondary disk system. By doing this, even if anerror occurs in the storage on one side, the processing is continued bythe storage on the other side. Further, in U.S. Pat. No. 5,870,537, theoperations when an error occurs in the remote copy system are described.It is described that if an error occurs in the primary disk system, theprocessing is continued by switching the path from the host computer tothe secondary disk system, and when the primary disk system recoversfrom the error, switching is made between the secondary disk system andprimary disk system.

The disk array is feasible in high-speed processing and the fiberchannel is highly expected as an interface for connecting disk arraysand host computers. The fiber channel is superior in performance andconnectivity, which are deficiencies of SCSI (small computer systeminterface) generally used in the prior art. Especially, in connectivity,while SCSI can be extended only to a connection distance of a few tensof meters, the fiber channel can be extended out to a few kilometers. Italso allows a few times as many devices to be connected. Because thefiber channel allows connection of a wide variety of devices and hostcomputers, it is appropriate for a local area network that is used indata communications between host computers, which is also called astorage area network. The fiber channel is standardized, and if devicesand host computers comply with these standards, they can be connected toa storage area network. For example, it is possible to connect aplurality of disk arrays and a plurality of host computers, which havefiber channel interfaces.

However, in the case of aforementioned U.S. Pat. No. 5,870,537, becausethe dedicated interface is used to connect the disk systems, it is notappropriate for remote copy via a storage area network. Also, in U.S.Pat. No. 5,870,537, if an error occurs in the primary disk system or thesecondary disk system, the pair for remote copy cannot recover until thesystem that caused the error recovers. This is because the dedicatedinterface is used for connecting the disk systems. This is because whenthe systems that are a pair for remote copy are connected with adedicated interface, data can be transferred only between the disksystems that are connected with the dedicated interface. In addition, inU.S. Pat. No. 5,870,537, if an error occurs in the primary disk system,the host computer processing is continued by means of that the hostcomputer switches the I/O destination to the secondary disk system.However, it requires switching on the host computer side and creates aproblem of an increased I/O overhead. Further, in U.S. Pat. No.5,870,537, the connection paths between the host computers and the disksystems are different from the connection path between the disk systemsfor remote copy. Therefore, an overhead which flows the paths increasesduring remote copying.

Moreover, in U.S. Pat. No. 5,870,537, there is no description on thecase where the primary disk system has been recovered. However, from thefacts that the primary site and secondary site are separated and thatthe secondary host computer can access only the secondary disk system,it is supposed that the primary host computer switches the I/Odestination to the primary disk system when recovered from an error.

Disclosure of the Invention

To solve the aforementioned problems, remote copy is performed via astorage area network and also when an error occurs in a storage systemfor remote copy, a standby storage system connected to the storage areanetwork is assigned as a substitute for the storage system in which theerror occurred. Also two host computer adapters that control theconnection with a host computer are installed in a disk system which isa storage system. When an error occurs in the primary disk system or thesecondary disk system, the processing is performed uninterruptedly bychanging the ID of one of the two host computer adapters to the deviceID of the disk system that caused the error, without changing the hostcomputer. In addition, a primary disk system that retransfers a command,which has been transferred from a host computer, to the storage areanetwork without changing it, and a secondary disk system that receives acommand with an ID different from the own device ID are installed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing the overall configuration in preferredembodiment 1 of the present invention.

FIG. 2 is a diagram showing the configuration of the disk system.

FIG. 3 is a diagram showing the hierarchy of the host computer program.

FIG. 4 is a diagram showing the remote copy configuration during normaloperation.

FIG. 5 is a diagram showing the remote copy configuration during error.

FIG. 6 is a diagram showing the host computer remote copy managementtable.

FIG. 7 is a flow chart showing the flow of the disk system controlprogram.

FIG. 8 is a diagram showing the distance-relationships between thestorage area network and systems.

FIG. 9 is a flow chart showing the secondary disk system selectionprocedure.

FIG. 10 is a diagram showing the remote copy configuration during normaloperation.

FIG. 11 is a diagram showing the remote copy configuration during error.

FIG. 12 is a table showing the remote copy management for a hostcomputer adapter.

FIG. 13 is a flow chart showing the primary transfer procedure for ahost computer adapter.

FIG. 14 is a flow chart showing the primary remote copy procedure.

FIG. 15 is a flow chart showing the secondary remote copy procedure.

FIG. 16 is a diagram showing the configuration of a host computeradapter.

FIG. 17 is a diagram showing an example configuration of the remote copysystem.

FIG. 18 is a diagram showing the command packet structure.

FIG. 19 is a flow chart showing the remote copy procedure.

FIG. 20 is a diagram showing the performance comparison.

THE PREFERRED EMBODIMENT OF THE INVENTION Preferred Embodiment 1

FIG. 1 shows a overall configuration diagram of the remote copy systemin the storage area network environment of the present invention. Number101 is a local area network, and numbers 102 and 103 are host computers.Numbers 105, 106 and 107 are disk systems. The host computers 102 and103 and the disk systems 105, 106 and 107 are connected to a storagearea network 104. The local area network 101 is mainly used forcommunications between the host computers and the storage area network104 is used for data communications between the disk systems 105, 106and 107 and the host computers 102 and 103, or the disk systems 105, 106and 107. Generally, the storage area network 104 has higher datatransfer performance than the local network 101. Therefore, the storagearea network is more suited for large-scale data transfer. The disksystem I/O control program on the host computers 102 and 103 has thefunction of issuing I/O requests of an application program (not shown inthe diagram) that is running on the host computers 102 and 103 to a disksystem. The disk systems 105, 106 and 107 are configured with diskcontrollers 108, 109 and 110 and disks 111, 112 and 113. The diskcontrollers 108, 109 and 110 are hardware that interprets and performsI/O requests issued from the host computers 102 and 103, and the disks111, 112 and 113 have the function of storing data transferred from thehost computers 102 and 103. The disk controllers 108, 109 and 110 areconfigured with host computer adapters 114, 115 and 116, caches 117, 118and 119 and disk adapters 120, 121 and 122. The host computer adapters114, 115 and 116 have the functions of receiving and interpretingcommands issued from the host computers 102 and 103. The disk adapters120, 121 and 122 have the function of performing input and output forthe disks 111, 112 and 113 based on the results of interpretation by thehost computer adapters 114, 115 and 116. The caches 117, 118 and 119 arethe areas that temporarily store the data read from the disks 111, 112and 113 and the write data that was transferred from the host computers102 and 103. When there are requests from the host computers 102 and 103for another read of the same data, it becomes possible to allow the I/Oresponse to be of high speed by returning the data from the caches 117,118 and 119 to the host computers 102 and 103. Also, because a writecompletion is reported to the host computers 102 and 103 when the datais stored in the caches 117, 118 and 119, it allows to be seen like thewrite was performed at high speed. In FIG. 1, the disk system 105 is theprimary disk system in remote copy and the disk system 106 is thesecondary disk system. And the disk system 107 is the standby disksystem and is a substitute when an error occurs in either the primarydisk system 105 or the secondary disk system 106. If the remote copysystem is normal, the host computers 102 and 103 issue I/O requests tothe primary disk system 105. When write requests are issued from thehost computers 102 and 103 to the primary disk system 105, the primarydisk system transfers the write data via the storage area network 104 tothe secondary disk system 106. As the result, the primary disk system105 and secondary disk system store the same data. The data transferfrom the primary disk system 105 to the secondary disk system 106 isperformed without the host computers 102 and 103 being aware of it.

FIG. 2 shows details of the disk system configuration. The disk systems105, 106 and 107 are configured with a disk controller 201 and disks207, 208, 209 and 210. The disk controller is configured with hostcomputer adapters 202 and 203, a disk cache 204 and disk adapters 205and 206. The host computer adapters 202 and 203, disk cache 204 and diskadapters 205 and 206 are connected with a bus 211, and communication ispossible between each configuration element via the bus 211. The hostcomputer adapters 202 and 203 have the functions of receiving andinterpreting commands issued from the host computers 102 and 103 and canbe installed in a plurality in the one disk controller 201. The diskadapters 205 and 206 have the function of performing I/O for the disks207, 208, 209 and 210 based on the results of interpretation by the hostcomputer adapters 202 and 203, and can be installed in a plurality inthe one disk controller 201 as are the host computer adapters 202 and203. Installing the host computer adapters 202 and 203 and the diskadapters 205 and 206 in a plurality allows distribution of theprocessing load and increases reliability.

FIG. 3 shows a structure of programs in the host computers 102 and 103.The program located at the highest level is an application program 301.The application program 301 is a program that is usually written by auser and performs a processing that becomes beginning of I/O requestsfor the disk systems 105, 106 and 107. The middle program is locatedbetween the application program 301 such as a data base and an operatingsystem 303. The operating system 303 is a program that manages a hostcomputer and controls hardware. It is located at the lowest level in theprogram hierarchy of a host computer. The operating system 303 includesa file system 304 and a disk I/O control program 305.

FIGS. 4 and 5 show one of the features of the present invention. FIG. 4shows the remote copy configuration during normal operation in thestorage area network 401 environment. The disk system 1 (402) is definedas the primary disk system, the disk system 2 (403) as the secondarydisk system and the disk system 3 (404) as the standby disk. FIG. 5shows how the remote copy definition in the present invention changeswhen an error occurs in the primary disk system 502. In the presentinvention, when an error occurs in the primary disk system 502, the disksystem that was defined as the secondary system is redefined as theprimary disk system and also the standby disk system 504 is defined asthe secondary disk system. By doing this, high reliability can beobtained until the disk system in which an error occurred recovers,differing from the conventional systems that can not be duallyconfigured.

In the present preferred embodiment, the configuration change from FIG.4 to FIG. 5 is directed by a host computer. The host computer remotecopy management table for remote copy, which is shown with FIG. 6, isstored in a host computer. The column 601 indicates disk system deviceidentifiers for remote copy. The column 602 indicates the distances froma host computer. The column 603 indicates the distances from the primarydisk system. The column 604 indicates the current attributes. Forexample, the disk system with the device ID 01 is defined as the primarydisk system, and the disk system with the device ID 03 is defined as thesecondary disk system to the disk system with the device ID 01. Theother disk systems are defined as a standby disk system. The columns 602and 603 are referred to mainly when standby disks are assigned to theprimary disk system and secondary disk system. The remote copy has animportant meaning in the holding of the same data at disk systems thatare located at a long distance away. If a purpose is to prevent disksystem errors caused by errors in operation of disk system configurationparts and firmware, duplicated disk systems can deal with it. However,to prevent the system from becoming inoperable due to large-scale powersupply problems or disasters, reliability can be increased by locatingthe duplicated disk systems as far away as possible. This is because theprobability of a simultaneous occurrence of errors can be reduced. Inthe conventional remote copy systems, because a remote copy dedicatedinterface cable was installed, the systems could not be changedfrequently. For this reason, there is no need for information ofdistances of the columns 602 and 603. However, in the remote copy systemin the storage area network environment of the present invention, theconfiguration can be changed dynamically. Therefore, when adding a newconfiguration to the remote copy system, it is necessary to select anappropriate disk system from knowing where disk systems are located.

FIG. 7 shows the flow of the disk system I/O control program on the hostcomputers 102 and 103. In step 701, an I/O request is issued to the disksystem. The termination of the I/O request issued in step 701 is judgedin step 702. In the case that it was normally terminated, this programends. In the case that it was not normally terminated, the programproceeds to step 703. Whether the I/O system that caused an error hasbeen defined as the remote copy is judged in step 703. This can bejudged by referring to the host computer remote copy management table ofFIG. 6. If the I/O system has not been defined as the remote copy, theprogram proceeds to step 704, and an error is reported (step 704) to thefile system (304 in FIG. 3). On the other hand, if the system thatcaused an error is one of the configuration elements of the remote copysystem, the program proceeds to step 705. In step 705, whether the I/Osystem that caused an error is the primary disk system is judged. Thiscan be judged by referring to the host computer remote copy managementtable of FIG. 6. In the case that the primary disk system caused anerror, the program proceeds to step 706, and if not so, the programproceeds to step 707. In step 706, a standby disk system is defined asthe secondary disk system. In this step, the update and change of thehost computer remote copy management table of FIG. 6 is informed to eachdisk system. In step 708, the disk system that has been the secondarydisk system up to now is redefined as the primary disk system. In step709, the I/O request that caused an error is reissued. On the otherhand, step 707 is performed when the secondary disk system causes anerror and means that the secondary disk system is assigned in the sameway as in step 706. By doing this, even if an error occurs in theprimary disk system, the remote copy system configuration can beimmediately reconstructed.

FIGS. 8 and 9 show the method of adding a standby disk system to theremote copy system in the present invention. Number 801 in FIG. 8 is thehost computer, number 803 is the primary disk system, and numbers 802and 804 are standby disk systems. For example, when a secondary systemis newly added, either number 802 or 804 can be selected. To operate theremote copy system effectively, it is an important index where eachconfiguration element of the remote copy system is located. The remotecopy has an important meaning in the holding of the same data at disksystems that are located at a long distance away. If a purpose is toprevent disk system errors caused by errors in operation of disk systemconfiguration parts and firmware, the duplicated disk systems, whichdoes not become aware of distance, can deal with it. However, to preventthe system from becoming inoperable due to power supply problems ordisasters, reliability can be increased by locating the duplicated disksystems as far away as possible. This is because the probability of asimultaneous occurrence of errors at the time of a power supply problemor disaster can be reduced by locating the systems at a long distanceaway. In FIG. 8, the distance (807) between the host computer 801 andthe standby disk system 804 is greater than the distance (805) betweenthe host computer 801 and the standby disk system 802. On the otherhand, the distance (806) between the standby disk system 802 and primarydisk system 803 is almost the same as the distance (808) between thestandby disk system 804 and primary disk system 803. If an importance isattached to taking measures against errors by means of locating thesystems at long distances away, in the example of FIG. 8, higherreliability can be obtained by assigning the standby disk system 804 asthe secondary disk system. FIG. 7 is the flow showing the method ofselecting a standby disk system in the present preferred embodiment. Instep 901, the disk systems that are defined as the standby disks in thehost computer remote copy management table of FIG. 6 are extracted. Instep 902, the product of the distances between the standby disk systemextracted in step 901 and both the host computer and primary disk systemis figured out, and the standby disk system with the largest value ofthis product is selected. This flow can be applied to steps 706 and 707in FIG. 7. An effective remote copy system can be constructed byselecting the standby disk in this way. In the present preferredembodiment, not only the distances between the disk systems, but alsothe distances between the host systems and disk systems can beincreased. Because not only the disk systems only, like the conventionalremote copy systems, can be located at long distances away between them,but also the disk systems and the hosts can be located at long distancesaway between them, compared to the conventional remote copy systems, aremote copy system with higher reliability can be provided. One of theimportant points of the present invention is that when a newconfiguration is added to the remote copy system in the storage areanetwork environment, it is possible to construct a more efficient systemby taking distance into consideration. By doing this, higher reliabilitycan be obtained because the probability of the system becominginoperable due to power supply problems and disasters can be reduced.

FIGS. 10 and 11 show one of the features of the present invention. Oneof the features of the present invention is that operation can continuewithout changing any of the programs on a host computer even if an erroroccurs in the primary system. FIG. 10 shows the remote copyconfiguration during normal operation in the present invention. Number1001 is the primary disk system and number 1002 is the secondary disksystem. The primary disk system 1001 includes a host computer adapter1003 and the secondary disk array 1002 includes two host computeradapters 1004 and 1005. Each host computer adapter 1003, 1004 and 1005is connected to the storage area network 1010. The host computeradapters 1003 and 1005, each has a unique device ID assigned in thestorage area network 1010. The device ID of the host computer adapter1003 is 1 and the device ID of the host computer adapter 1005 is 2. Thehost computer adapter 1004 is nullified during normal operation. If awrite request is issued from a host computer (not shown in the diagram)to the primary disk system 1001, the host computer adapter 1003 performsa remote copy by transferring data via the storage area network 1010 tothe host computer adapter 1005. On the other hand, FIG. 11 is a diagramshowing that an error has occurred in the primary disk array. In thiscase, as mentioned above, the disk system that has been operating as thesecondary disk system so far, is changed its attribute to the primarydisk system. The device ID that the host computer adapter 1103 of thedisk system 1101, in which an error occurred, had is transferred to thehost computer adapter 1104 in the primary disk system 1102. Further, thehost computer adapter 1103 in the disk system 1101, in which an erroroccurred, is nullified. By doing this, an I/O request issued by a hostcomputer (not shown in the diagram) becomes to be able to be processedin the new primary disk system 1102, and the processing can be continuedwithout changing the various programs on the host computer.

To realize the aforementioned processing, the host computer adapterremote copy management table shown with FIG. 12 is stored in each disksystem. The column 1201 is the device ID field, the column 1202 is theattribute field of the remote copy system and the column 1203 is theremote copy object volume field. Even a single disk system, it isgeneral that it can define a plurality of volumes. A user can selectwhether a remote copy is performed, according to the application of avolume. For this function, the object volumes of the column 1203 arenecessary.

FIG. 13 shows the flow of the primary transfer procedure that isperformed by the host computer adapter in the secondary disk system. Instep 1301, the device ID of the primary disk system is obtained. Thiscan be obtained by referring to the host computer adapter remote copymanagement table of FIG. 12. In step 1302, the device ID of the hostcomputer adapter nullified in the secondary disk system is changed tothe device ID that was obtained in step 1301. In step 1303, the hostcomputer adapter nullified in the secondary disk system is assigned asthe primary disk system. In step 1304, the host computer adapternullified in the secondary disk system is made effective. By doing this,even if an error occurs in the primary disk system, it is not necessaryto change hardware and software of the host computer. In addition, it isnot necessary either to stop programs running on the host computer.

FIGS. 14 to 20 show the method for realizing a high-speed remote copy,which is one of the features of the present invention. The remote copyin the storage area network environment and the conventional remote copyare very different with respect to those configurations. Theconventional remote copy, for example, uses a dedicated cable to performthe data transfer between the primary disk system and secondary disksystem. Because of this fact, it has the arrangement in which theconnection between the host computer and primary disk system and theconnection between the primary disk system and secondary disk system aremade with different cables. However, in the storage area network, thehost computers, primary disk system and secondary disk system areconnected with the same kind of cables. In the conventional remote copy,because the remote copy system was constructed with two differentcables, two host computer adapters are required in the primary disksystem. A communication overhead between these two host computeradapters caused the performance of the remote copy to deteriorate. InFIGS. 14 to 20, a remote copy with a single host computer adapter isrealized and the realization of its high speed will be described.

FIG. 14 shows the processing flow in the host computer adapter in theprimary disk system. In step 1401, an I/O request transferred in apacket format via the storage area network from a host computer isreceived. In step 1402, whether the request command is a write requestis judged. If it is a write request, the program proceeds to step 1403.If not so, the program proceeds to step 1405. In step 1405, a readrequest is performed and the procedure ends. In step 1403, the packetreceived in step 1401 is retransferred to the storage area network. Thiswill be received by the secondary disk system that will be describedlater. Here, a feature is retransferring the packet received by theprimary disk system in an intact format. By doing this, overheads likeanalyzing a command and changing a packet format can be eliminated. Instep 1404, the write command from the host computer is executed in theprimary disk system. In step 1406, it is judged whether the writecommand was executed for an object volume for remote copy. This can bejudged by referring to the host computer adapter remote copy managementtable of FIG. 12. If it is a write for an object volume for remote copy,the program proceeds to step 1407. If not so, the procedure ends. Instep 1407, a wait is made for a remote copy complete report from thesecondary disk system and after that, the procedure ends.

FIG. 15 shows the flow of the remote copy processing in the secondarydisk system. In step 1501, an I/O request transferred in a packet formatvia the storage area network is received. In step 1502, it is judgedwhether the transferred I/O request is a write command transferred fromthe primary disk array. This can be judged by referring to the hostcomputer adapter remote copy management table of FIG. 12. Here, afeature is that, as mentioned above, because the received packet is theone which the primary disk system had received and retransferred as itwas, the packet includes information of the primary disk system.Therefore, step 1502 means that the request for the primary disk systemis received by the secondary disk system. In step 1504, it is judgedwhether the received command is for a remote copy object volume. Thiscan be judged by referring to the host computer adapter remote copymanagement table of FIG. 12. If it is a write for an object volume forremote copy, the program proceeds to step 1505. If not so, the procedureends. In step 1505, the write is performed according to the receivedcommand. In step 1507, the completion of the write processing in thesecondary disk system is notified to the primary disk system and theprocedure ends. In steps 1503 and 1506, usual I/Os transferred fromdevices except the primary disk system are performed and the procedureends.

FIGS. 16, 17 and 18 are diagrams that give detailed descriptions ofsteps 1501 and 1502 in FIG. 15. FIG. 16 is a diagram that gives furtherdetails of the host computer adapter 1601. Number 1602 is an interfacecontrol LSI, number 1603 is a control processor, number 1604 is memoryand number 1605 is a bus control LSI. The interface LSI (1602) is an LSIthat controls communications with the storage area network. Mainly itperforms controlling a communication protocol for the storage areanetwork. The control processor 1603 performs the main control of thehost computer adapter 1601 and the programs to be executed are stored inmemory 1604. The bus control LSI is an LSI that controls the bus (211 inFIG. 2) in the storage system. Steps 1501 and 1502 in FIG. 15 showmainly the processing in the interface control LSI. All the steps exceptsteps 1501 and 1502 in FIG. 15 are executed by the control processor1603.

FIG. 17 shows an example of the remote copy configuration described inFIGS. 14 and 15. The host computer 1701, primary disk system 1703 andsecondary disk system 1704 are connected to the storage area network1702. The device ID of the host computer 1701 is 0, the device ID of thehost computer adapter in the primary disk system 1703 is 1 and thedevice ID of the host computer adapter in the secondary disk system 1704is 2. Data is transferred in the packet format shown in FIG. 18 over thestorage area network 1702. Number 1801 is a field that indicates thebeginning of the frame and number 1802 is the frame header. Number 1803stores I/O commands and data. Number 1804 stores the codes for checkingwhether there is no error in packet data. Number 1805 is a field showingthe end of the frame. The frame header is structured with the senddestination device ID field (1806), send source device ID field (1807)and control field. For example, when a packet is transferred from thehost computer 1701 to the primary disk system 1703 in FIG. 17, 1 isstored in the send destination device ID field and 0 is stored in thesend source device ID field. I/O commands are stored in number 1803.

FIG. 19 shows an example of the operation in one preferred embodiment ofthe remote copy in the invention. Number 1901 shows the host computeroperation, number 1902 shows the operation of the primary disk systemand number 1903 shows the operation of the secondary disk system. First,a write command is issued from the host computer (1904). The primarydisk system receives this command (1905). 1 of the primary disk systemis stored as the send destination ID and 0 indicating the host computeris stored as the send source ID. This command is immediately transferredto the secondary disk system and is received by the secondary disksystem (1907). When the primary disk system finishes sending the packet,it starts to execute the write command (1908). The packet received bythe secondary disk system is the same in content as the content receivedin step 1905. Therefore, the send destination ID 1 indicating theprimary disk system is stored and the send source ID 0 indicating thehost computer is stored. The secondary system receives this packet andjudges whether it is a command to be executed (1909). If the command isa command to be executed, it executes that command (1910). When thewrite processing by the secondary disk system ends, an end report istransferred to the primary disk system (1911). The primary disk systemwaits for an end notice from the secondary disk system (1912) andconfirms the end of the write processings in both the primary andsecondary, and issues a write completion notice to the host computer(1913). In this way, the remote copy by the present invention completes(1914).

FIG. 20 is a diagram that compares the performance of the remote copy inthe present invention, when processing according to the same flow as theconventional remote copy, with the performance of the conventionalremote copy. Up to the present, a packet is received on the primary side(2001), the command is analyzed (2002) and then the packet is sent tothe secondary (2003). On the primary side, a write processing isperformed (2004) and a wait is made for ending of a write processing onthe secondary side (2005). On the secondary side, the packet is received(2007), the command is analyzed (2008), a write processing is performed(2009) and then the end is reported to the primary. On the primary side,an end notice packet is received (2005) and the end of a writeprocessing is reported to the host computer (2006). In contrast to this,in the preferred embodiment of the present invention, on the primaryside, after receiving a packet issued by the host computer (2010), thepacket is immediately sent to the secondary (2011). On the secondaryside, this packet is received (2016), the command is analyzed (2017) anda write processing is performed (2018). On the other hand, on theprimary side, after sending the packet to the secondary (2011), thecommand is analyzed (2012). After a write processing is performed(2013), a wait for the write processing on the secondary side is made(2014) to issue an end notice to the host computer (2015). In thepresent invention, compared to the processing that follows theconventional method, it is possible to realize a high-speed remote copyresponse because sending of a packet to the secondary can be expedited.

In addition, as another effect of the present preferred embodiment,there is a sharing of the remote copy system with a plurality of hostcomputers, which was not possible in the conventional remote copy. AsFIG. 1 shows, a plurality of host computers (102 and 103) can beconnected to the storage area network 104. Each of a plurality of hostcomputers can share the remote copy system with others. Therefore, inthe remote copy system described in the present preferred embodiment,for example, even if an error occurs in the host computer 102, byholding the host computer remote copy management table shown with FIG. 6on the host computer 103, the host computer 103 can take over processingin the same remote copy system configuration as the host computer 102.In the conventional remote copy system, the host computer connected tothe secondary disk system could only access the secondary disk system,but in the present preferred embodiment, because each of a plurality ofhost computers can share the remote copy system with the sameconfiguration, it is possible to construct a remote copy system withhigher reliability.

What is claimed is:
 1. A storage area network system comprising: storage area network; a host computer; a primary storage system; a secondary storage system; and a standby storage system, wherein said host computer, said primary storage system, said secondary storage system and said standby storage system are connected to each other by said storage area network, wherein said primary storage system performs a remote copy by performing a write in response to a write request from said host computer via said storage area network, and also transfers the write command to said secondary storage system via said storage area network, and wherein when an error occurs in either said primary storage system or said secondary storage system, the storage system in which the error occurred is replaced with said standby storage system.
 2. A storage area network system according to claim 1, wherein when an error occurs in said primary storage system, said secondary storage system is assigned as said primary storage system and said standby storage system is assigned as said secondary storage system.
 3. A storage area network system comprising: a storage area network; a host computer connected to said storage area network; a primary storage system connected to said storage area network; and a secondary storage system connected to said storage area network, wherein said primary storage system performs a remote copy by performing a write in response to a write request from said host computer, and also transfers the write command to said secondary storage system, wherein when an error occurs in either said primary storage system or said secondary storage system, the storage system in which the error occurred is replaced with a standby storage system, and wherein switching to said standby storage system is performed by said host computer.
 4. A storage area network system comprising: a storage area network; a primary storage system connected to said storage area network and a secondary storage system; and a plurality of standby storage systems connected to said storage area network, wherein when an error occurs in said secondary storage system, a product of distances from each of a plurality of said standby storage systems to the host computer and said primary storage system is figured out, and wherein the standby storage system with the largest value of this product is newly assigned as the secondary storage system.
 5. A storage area network system comprising: a storage area network; a host computer; a primary storage system; and a secondary storage system, wherein said host computer, said primary storage system and said secondary storage system are connected to each other by said storage area network, wherein said primary storage system performs a write in response to a write request from said host computer via said storage area network and also transfers said write command to said secondary storage system via said storage area network; and wherein said secondary storage system has a plurality of host computer interfaces all of which are connected to said storage area network and one of which has no device identifier and also, when an error occurs in said primary storage system, the device identifier of said primary storage system is assigned to one of a plurality of said host computer interfaces which has no device identifier before.
 6. A storage area network system according to claim 5, wherein when an error occurs in said primary storage system, the host computer interface of said primary storage system is nullified.
 7. A primary storage system connected to a storage area network to which a host computer and a secondary storage system are connected by a network interface, wherein said primary storage system performs a write in response to a write request command from said host computer via said storage area network and said network interface, and when performing a remote copy to transfer said write request command to said secondary storage system via said storage area network and said network interface, retransfers the write request command from said host computer to said secondary storage system via said storage area network by using said network interface as it was.
 8. A secondary storage system connected to a storage area network to which a host computer and a primary storage system are connected, wherein said secondary storage system, if a write request command is sent from said host computer to said secondary storage system via said primary storage system and said storage area network, receives said write request command which includes an identifier for said primary storage system.
 9. A host computer connected to a storage area network which is connected to a first storage system and a second storage system, wherein said first storage system is defined as a primary storage system, wherein said second storage system is defined as a secondary storage system which is the remote copy destination of said primary storage system, and wherein when an error is detected in said first storage system, the definition of said second storage system is changed to said primary storage system via said storage area network.
 10. A host computer according to claim 9, wherein when said first storage system is recovered from the error, said first storage system is defined as the secondary storage system. 